namespace XRM.Security.DataAccess.Context
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class CertFilesToDb : DbMigration
    {
        public override void Up()
        {
            Sql("delete from CertRegisterInfoSystem");
            Sql("delete from CertRegister");
            Sql("delete from IdentityCenterCert");

            AddColumn("dbo.IdentityCenterCert", "FileData", c => c.Binary());
            AddColumn("dbo.CertRegister", "FileData", c => c.Binary());
        }
        
        public override void Down()
        {
            DropColumn("dbo.CertRegister", "FileData");
            DropColumn("dbo.IdentityCenterCert", "FileData");
        }
    }
}
